package com.czh.mybatisplus.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.czh.mybatisplus.entity.Mall;
import com.czh.mybatisplus.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.czh.mybatisplus.entity.User;
import com.sun.org.apache.xpath.internal.operations.Or;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.ResultHandler;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author czh
 * @since 2024-09-05
 */
public interface OrderMapper extends BaseMapper<Order> {

    List<Order> orderAll(String name);

    /**
     * 动态表名查询（一）或是xml配置select标签用${表名}查询（二）
     * @param tableName
     * @return
     */
    @Select("SELECT * FROM ${tableName}")
    List<User> tableSelect(@Param("tableName") String tableName);
}
